<template>
  <div class="wdsp">
    <div class="row" style="z-index: 0;">
      <div class="line"></div>
      <div>添加任务</div>
      <div class="iconfont icon-close" @click="goBack()">&#xe608;</div>
    </div>
    <div style="margin-top: 60px;">
      <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
        <el-form-item label="任务名称" prop="taskname">
          <el-input style="width: 45%;" v-model="ruleForm.taskname"></el-input>
        </el-form-item>
        <el-form-item label="截止时间" required prop="by_time">
          <el-date-picker style="width: 45%;" @change="dateChangebirthday" value-format="yyyy-MM-dd HH:mm:ss" format='yyyy-MM-dd HH:mm:ss'
            v-model="ruleForm.by_time" type="datetime" placeholder="选择日期时间" align="right">
          </el-date-picker>
        </el-form-item>

        <el-row :gutter="12">
          <el-col :span="4">
            <el-form-item label="发布时间" prop="set_publish">
              <el-select v-model="ruleForm.set_publish" placeholder="请选择时间">
                <el-option v-for="item in setpublish" :key="item.value" :label="item.name" :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="" prop="start_time">
              <el-select v-model="ruleForm.start_time" placeholder="请选择时间">
                <el-option v-for="item in starttime" :key="item.value" :label="item.name" :value="item.name">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="" prop="end_time">
              <el-select v-model="ruleForm.end_time" placeholder="请选择时间">
                <el-option v-for="item in starttime" :key="item.value" :label="item.name" :value="item.name">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-form-item label="背景图片" prop="bgimgs">
          <el-upload ref="cropperUpload" :action="img_url" multiple :on-success="bg_img"
            accept="image/png,image/jpeg,image/jpg" list-type="picture-card" :auto-upload="true">
            <i slot="default" class="el-icon-plus"></i>
            <div slot="file" slot-scope="{file}">
              <img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
              <span class="el-upload-list__item-actions">
                <span class="el-upload-list__item-delete" @click="handleRemove(file)">
                  <i class="el-icon-delete"></i>
                </span>
              </span>
            </div>
          </el-upload>
          <el-dialog :visible.sync="dialogVisible">
            <img width="100%" :src="dialogImageUrl" alt="">
          </el-dialog>
        </el-form-item>

        <el-form-item label="相册图片" prop="imgs">
          <el-upload ref="cropperUpload1" multiple :action="img_url" :on-success="bg_img1"
            accept="image/png,image/jpeg,image/jpg" list-type="picture-card" :auto-upload="true">
            <i slot="default" class="el-icon-plus"></i>
            <div slot="file" slot-scope="{file}">
              <img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
              <span class="el-upload-list__item-actions">
                <span class="el-upload-list__item-delete" @click="handleRemove1(file)">
                  <i class="el-icon-delete"></i>
                </span>
              </span>
            </div>
          </el-upload>
          <el-dialog :visible.sync="dialogVisible1">
            <img width="100%" :src="ruleForm.imgs" alt="">
          </el-dialog>
        </el-form-item>

        <el-form-item label="视频" prop="free_video">
          <el-upload class="upload-demo" accept=".mp4" :action="img_url" :on-success="freevideo"
            :before-remove="beforeRemove" :on-remove="onbeforeRemove" multiple :limit="25" :on-exceed="handleExceed"
            :auto-upload="true">
            <el-button size="small" type="primary">点击上传</el-button>
            <div slot="tip" class="el-upload__tip">只能上传.MP4文件，且不超过128M</div>
          </el-upload>
        </el-form-item>

        <el-form-item label="音乐" prop="musics">
          <el-upload class="upload-demo" accept=".mp3" :action="img_url" :on-success="musics_add"
            :before-remove="beforeRemove1" :on-remove="onbeforeRemove1" multiple :limit="25" :on-exceed="handleExceed"
            :auto-upload="true">
            <el-button size="small" type="primary">点击上传</el-button>
            <div slot="tip" class="el-upload__tip">只能上传.MP3文件，且不超过25M</div>
          </el-upload>
        </el-form-item>

        <el-form-item label="选择账号" prop="account_id">
          <el-select v-model="ruleForm.account_id" multiple placeholder="请选择账号">
            <el-option v-for="item in accountlist" :key="item.id" :label="item.nickname" :value="item.id">
            </el-option>
          </el-select>
        </el-form-item>

        <el-row :gutter="20">
          <el-col :span="7">
            <el-form-item label="地区" prop="diqu">
              <el-popover placement="top" width="160" v-model="visible_diqu">
                <el-select v-model="ruleForm.diqu" multiple placeholder="请选择地区">
                  <el-option v-for="(item,index) in diqulist" :key="index" :label="item" :value="item">
                  </el-option>
                </el-select>
                <div style="text-align: right; margin: 0">
                  <el-button size="mini" type="text" @click="visible_diqu = false">取消</el-button>
                  <el-button type="primary" size="mini" @click="visible_diqu = false">确定</el-button>
                </div>
                <el-button @click="userkey_diqu" type="primary" size="mini" slot="reference">选择地区</el-button>
              </el-popover>
              <div style="margin-top: 12px;">
                <el-input :autosize="{ minRows: 2, maxRows: 4}" disabled type="textarea"
                  v-model="ruleForm.diqu == '' ? '' : ruleForm.diqu">
                </el-input>
              </div>
            </el-form-item>
          </el-col>
          <el-col :span="7">
            <el-form-item label="关键词">
              <el-popover placement="top" width="160" v-model="visible_zhuci">
                <el-select v-model="ruleForm.zhuci" multiple placeholder="请选择关键词">
                  <el-option v-for="(item,index) in zhanghaolist" in list :key="index" :label="item" :value="item">
                  </el-option>
                </el-select>
                <div style="text-align: right; margin: 0">
                  <el-button size="mini" type="text" @click="visible_zhuci = false">取消</el-button>
                  <el-button type="primary" size="mini" @click="visible_zhuci = false">确定</el-button>
                </div>
                <el-button @click="userkey_zhuci" type="primary" size="mini" slot="reference">选择关键词</el-button>
              </el-popover>
              <div style="margin-top: 12px;">
                <el-input :autosize="{ minRows: 2, maxRows: 4}" disabled type="textarea" v-model="ruleForm.zhuci">
                </el-input>
              </div>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="后缀" prop="houzhui">
              <el-popover placement="top" width="160" v-model="visible_hz">
                <el-select v-model="ruleForm.houzhui" multiple placeholder="请选择后缀">
                  <el-option v-for="(item,index) in houzhuilist" :key="index" :label="item" :value="item">
                  </el-option>
                </el-select>
                <div style="text-align: right; margin: 0">
                  <el-button size="mini" type="text" @click="visible_hz = false">取消</el-button>
                  <el-button type="primary" size="mini" @click="visible_hz = false">确定</el-button>
                </div>
                <el-button @click="userkey_hz" type="primary" size="mini" slot="reference">选择后缀</el-button>
              </el-popover>
              <div style="margin-top: 12px;">
                <el-input :autosize="{ minRows: 2, maxRows: 4}" disabled type="textarea" v-model="ruleForm.houzhui">
                </el-input>
              </div>
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item>
          <el-button type="primary" @click="submitForm('ruleForm')">立即创建</el-button>
          <el-button @click="resetForm('ruleForm')">重置</el-button>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        //form提交数据
        ruleForm: {
          taskname: '', //任务名称
          by_time: '', //日期
          set_publish: '', //每天
          start_time: '',
          end_time: '',
          bgimgs: '', //背景图片
          imgs: '', //相册照片
          free_video: '', //视频
          musics: '', //音乐
          account_id: '', //账号
          diqu: '', //地区
          zhuci: '', //关键词
          houzhui: '', // 后缀
        },
        setpublish: [{
          value: 1,
          name: '每天'
        }, {
          value: 2,
          name: '隔天'
        }, {
          value: 3,
          name: '隔两天'
        }],
        starttime: [],
        //验证
        rules: {
          taskname: [{
              required: true,
              message: '请输入任务名称',
              trigger: 'blur'
            },
            {
              min: 1,
              max: 40,
              message: '长度在 1 到 40 个字符',
              trigger: 'blur'
            }
          ],
          region: [{
            required: true,
            message: '请选择活动区域',
            trigger: 'change'
          }],
          by_time: [{
            required: true,
            message: '请选择日期和时间',
            trigger: 'change'
          }],
          set_publish: [{
            required: true,
            message: '请选择一个任务性质',
            trigger: 'change'
          }],
          start_time: [{
            required: true,
            message: '请选择一个任务时间',
            trigger: 'change'
          }],
          end_time: [{
            required: true,
            message: '请选择一个任务时间',
            trigger: 'change'
          }],
          bgimgs: [{
            required: false,
            message: '请上传背景图片',
            trigger: 'change'
          }],
          imgs: [{
            required: false,
            message: '请上传相册图片',
            trigger: 'change'
          }],
          free_video: [{
            required: false,
            message: '请上传视频',
            trigger: 'change'
          }],
          musics: [{
            required: false,
            message: '请上传音乐',
            trigger: 'change'
          }],
          account_id: [{
            required: true,
            message: '请选择账号',
            trigger: 'array'
          }],
        },
        dialogVisible: false,
        dialogVisible1: false,
        fileList: [], //视频展示
        fileList1: [], //音乐
        accountlist: [], //选择账号
        disabled: false,
         img_url: '/api/admin/ajax/upload',
       // img_url: '/admin/ajax/upload',
        visible_diqu: false,
        visible_zhuci: false,
        visible_hz: false,
        diqulist: [],
        zhanghaolist: [],
        houzhuilist: [],
        dialogImageUrl: ''
      };
    },
    created() {
      this.account()
      this.time_day()
    },
    methods: {
      dateChangebirthday(val) {
        this.ruleForm.by_time = val
      },
      submitForm(formName) {
        //处理数据
        let data = {
          taskname: this.ruleForm.taskname, //任务名称
          by_time: this.ruleForm.by_time, //日期
          set_publish: this.ruleForm.set_publish, //每天
          start_time: parseInt(this.ruleForm.start_time),
          end_time: parseInt(this.ruleForm.end_time),
          bgimgs: this.ruleForm.bgimgs, //背景图片
          imgs: this.ruleForm.imgs, //相册照片
          free_video: this.ruleForm.free_video, //视频
          musics: this.ruleForm.musics, //音乐
          account_id: this.ruleForm.account_id, //账号
          diqu: this.ruleForm.diqu.toString(), //地区
          zhuci: this.ruleForm.zhuci.toString(), //关键词
          houzhui: this.ruleForm.houzhui.toString(), // 后缀
        }
        data.zhuci = data.zhuci.replace(/,/g, "\n");
        data.diqu = data.diqu.replace(/,/g, "\n");
        data.houzhui = data.houzhui.replace(/,/g, "\n");

        console.log(data, '提交');
        // if(data.bgimgs == "" || data.imgs == "" || data.free_video == "" || data.musics == ""){
        //   return this.$confirm("背景图片-相册照片-视频-视频 不能为空");
        // }
        this.$refs[formName].validate((valid) => {
          if (valid) {
            let res = this.$api.automatiadd(data);
            let b = res.then((v) => {
              if (v.code == 1) {
                this.$router.push({
                  name: "automaticrelease"
                });
              } else {
                return this.$confirm(v.msg);
              }
            })
          }
        });
      },
      // 拼接处选择的时间
      time_day() {
        for (var i = 0; i < 24; i++) {
          this.starttime.push({
            value: i,
            name: i >= 10 ? i + ':' + '00' : '0' + i + ':' + '00'
          })
        }
      },
      //获取地区
      async userkey_diqu() {
        let res = await this.$api.userkeydiqu();
        this.diqulist = res
        this.visible_diqu = true
      },
      //获取关键词
      async userkey_zhuci() {
        let res = await this.$api.userkeyzhuci();
        this.zhanghaolist = res
        this.visible_zhuci = true
      },
      //获取后缀
      async userkey_hz() {
        let res = await this.$api.userkeyhz();
        this.houzhuilist = res
        this.visible_hz = true
      },

      //获取账号
      async account() {
        let username = localStorage.getItem('person');
        let res = await this.$api.account({
          username: JSON.parse(username).username
        });
        if (res.code == 200) {
          this.accountlist = res.data
        }
      },
      //背景图片上传
      bg_img(file) {
        if (file.code == 1) {
          if (this.ruleForm.bgimgs == '') {
            this.ruleForm.bgimgs += file.data.url;
          } else {
            this.ruleForm.bgimgs += '|' + file.data.url + '|';
            this.ruleForm.bgimgs = this.ruleForm.bgimgs.slice(0, this.ruleForm.bgimgs.length - 1)
          }
        } else {
          return this.$confirm('上传失败');
        }
      },
      //相册图片上传
      bg_img1(file) {
        if (file.code == 1) {
          if (this.ruleForm.imgs == '') {
            this.ruleForm.imgs += file.data.url;
          } else {
            this.ruleForm.imgs += '|' + file.data.url + '|';
            this.ruleForm.imgs = this.ruleForm.imgs.slice(0, this.ruleForm.imgs.length - 1)
          }
        } else {
          return this.$confirm('上传失败');
        }
      },
      //视频上传
      freevideo(file) {
        if (file.code == 1) {
          if (this.ruleForm.free_video == '') {
            this.ruleForm.free_video += file.data.url;
          } else {
            this.ruleForm.free_video += '|' + file.data.url + '|';
            this.ruleForm.free_video = this.ruleForm.free_video.slice(0, this.ruleForm.free_video.length - 1)
          }
        } else {
          return this.$confirm('上传失败');
        }
      },
      //音乐上传
      musics_add(file) {
        if (file.code == 1) {
          if (this.ruleForm.musics == '') {
            this.ruleForm.musics += file.data.url;
          } else {
            this.ruleForm.musics += '|' + file.data.url + '|';
            this.ruleForm.musics = this.ruleForm.musics.slice(0, this.ruleForm.musics.length - 1)
          }
        } else {
          return this.$confirm('上传失败');
        }
      },
      //重置form表单
      resetForm(formName) {
        this.$refs[formName].resetFields();
      },
      //验证当前文件选择
      handleExceed(files, fileList) {
        this.$message.warning(`当前限制选择 1 个文件，本次选择了 ${files.length} 个文件，共选择了 ${files.length + fileList.length} 个文件`);
      },
      //删除附件提示视频
      beforeRemove(file, fileList) {
        return this.$confirm(`确定移除 ${file.name}？`)
      },
      // 删除附件视频
      onbeforeRemove(file, fileList) {
        if (fileList.length == 0) {
          this.ruleForm.free_video = ''
        } else {
          let str = ''
          for (var i = 0; i < fileList.length; i++) {
            if (fileList.length == 1) {
              str += fileList[i].response.data.url;
            } else {
              str += '|' + fileList[i].response.data.url + '|';
              str = str.slice(0, str.length - 1)
            }
          }
          this.ruleForm.free_video = str
        }
      },
      //删除文件音乐
      beforeRemove1(file, fileList) {
        return this.$confirm(`确定移除 ${file.name}？`)
      },
      // 删除文件音乐
      onbeforeRemove1(file, fileList) {
        if (fileList.length == 0) {
          this.ruleForm.musics = ''
        } else {
          let str = ''
          for (var i = 0; i < fileList.length; i++) {
            if (fileList.length == 1) {
              str += fileList[i].response.data.url;
            } else {
              str += '|' + fileList[i].response.data.url + '|';
              str = str.slice(0, str.length - 1)
            }
          }
          this.ruleForm.musics = str
        }
      },
      handleRemove(file) {
        this.$confirm(`确定移除 ${ file.name }？`, '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          let fileList = this.$refs.cropperUpload.uploadFiles;
          let index = fileList.findIndex(fileItem => {
            return fileItem.uid === file.uid
          })
          fileList.splice(index, 1)
          if (fileList.length == 0) {
            this.ruleForm.bgimgs = ''
          } else {
            let str = ''
            for (var i = 0; i < fileList.length; i++) {
              if (fileList.length == 1) {
                str += fileList[i].response.data.url;
              } else {
                str += '|' + fileList[i].response.data.url + '|';
                str = str.slice(0, str.length - 1)
              }
            }
            this.ruleForm.bgimgs = str
          }
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          });
        });
      },
      handleRemove1(file) {
        this.$confirm(`确定移除 ${ file.name }？`, '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          let fileList = this.$refs.cropperUpload1.uploadFiles;
          let index = fileList.findIndex(fileItem => {
            return fileItem.uid === file.uid
          })
          fileList.splice(index, 1)
          if (fileList.length == 0) {
            this.ruleForm.imgs = ''
          } else {
            let str = ''
            for (var i = 0; i < fileList.length; i++) {
              if (fileList.length == 1) {
                str += fileList[i].response.data.url;
              } else {
                str += '|' + fileList[i].response.data.url + '|';
                str = str.slice(0, str.length - 1)
              }
            }
            this.ruleForm.imgs = str
          }
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          });
        });
      },
      //跳转路径
      goBack() {
        this.$router.push({
          name: "automaticrelease"
        });
      },
    }
  }
</script>
<style lang="less" scoped>
  .wdsp {
    position: relative;
    width: 100%;
    height: 160%;
    padding-top: 52px;
    box-sizing: border-box;
    background-color: #fff;
  }

  .tab-block {
    position: absolute;
    top: 52px;
    left: 50%;
    z-index: 10;
    transform: translate(-50%, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 120px;
    padding: 40px 0px;
    box-sizing: border-box;

    .icon-close {
      position: absolute;
      right: 25px;
      top: 25px;
      color: #999;
      cursor: pointer;
      user-select: none;
      font-size: 18px;
    }
  }

  .vertical-tab-block {
    width: 100%;
    height: 30%;
    padding: 0 0 0 42px;
    box-sizing: border-box;
  }

  .tab-item {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 60px 0px 120px 0px;
    box-sizing: border-box;

    .vertical-tab-item {
      flex-grow: 1;
      display: flex;
      padding: 0px 120px;
      box-sizing: border-box;
      overflow: auto;
      height: 70%;

      .left {
        width: 50%;
        height: 100%;
      }

      .right {
        position: relative;
        padding-top: 48px;
        box-sizing: border-box;
        width: 50%;
        height: 100%;
      }
    }
  }

  .form-btn-list {
    position: absolute;
    bottom: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 120px;
    background-color: #fff;

    .button {
      width: 144px;
      height: 38px;
      margin-right: 32px;
    }
  }

  // simple form
  .my-simple-form {
    position: absolute;
    top: 0;
    display: flex;
    align-items: center;
    width: 100%;
    height: 60px;

    .search-block {
      .icon {
        font-size: 18px;
        color: #999;
        user-select: none;
        cursor: pointer;
      }
    }

    .input-block {
      display: flex;
      align-items: center;
      width: 150px;
      height: 100%;
      margin-right: 15px;

      .input {
        width: 100%;
        height: 32px;
        border-radius: 5px;
        padding: 0 8px;
        box-sizing: border-box;
        color: #333;
        font-size: 14px;
        outline: none;
        border: 1px solid #d7d7d7;

        &::-webkit-input-placeholder {
          color: #808595;
          font-size: 14px;
        }

        &:-moz-placeholder {
          color: #808595;
          font-size: 14px;
        }

        &::-moz-placeholder {
          color: #808595;
          font-size: 14px;
        }

        &:-ms-input-placeholder {
          color: #808595;
          font-size: 14px;
        }
      }

      .label {
        display: flex;
        align-items: center;

        .text {
          width: 90px;
          color: #333;
          font-size: 14px;
          text-align: right;
          white-space: nowrap;
        }
      }
    }

    .select-block {
      display: flex;
      align-items: center;
      width: 150px;
      height: 32px;
      margin-right: 15px;

      /deep/ .el-select {
        width: 100%;
        height: 100%;

        .el-input {
          height: 100%;

          .el-input__inner {
            height: 100%;
            border: 1px solid #e7e7e7;
          }

          .el-input__icon {
            line-height: normal;
          }
        }
      }
    }

    .button {
      margin-left: 15px;
    }

    .label {
      color: #333;
      font-size: 14px;
    }
  }

  // user list
  .user-list {
    flex-shrink: 1;
    width: 100%;
    height: 100%;
    padding: 0 5px;
    box-sizing: border-box;
    overflow: auto;

    .list-item {
      display: flex;
      border-bottom: 1px solid #eee;
      padding: 20px 0;
    }

    .user-avatar {
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 80px;
      height: 100%;

      img {
        width: 50px;
        height: 50px;
        border-radius: 50%;
      }
    }

    .user-info {
      position: relative;
      flex: 1;
      height: 100%;

      .user-name {
        color: #333;
        font-size: 12px;
        margin-bottom: 8px;
      }

      .user-row {
        display: flex;
        align-items: center;

        .line {
          width: 2px;
          height: 12px;
          background-color: #eee;
          margin: 0 25px;
        }

        .text {
          color: #808595;
          font-size: 12px;
        }

        .circle {
          width: 8px;
          height: 8px;
          border-radius: 50%;
          margin: 0 15px;
        }

        .suc {
          background-color: #299a89;
        }

        .err {
          background-color: #bd1e1e;
        }
      }

      .mark {
        position: absolute;
        top: 50%;
        right: 50px;
        transform: translate(0, -50%);
        width: 11px;
        height: 11px;
        border: 1.5px solid #999;
        border-radius: 2px;
        user-select: none;
        cursor: pointer;

        .icon {
          position: absolute;
          top: -5px;
          right: -5px;
          color: #999;
          font-size: 18px;
        }
      }
    }
  }

  // 弹窗
  .el-dialog__wrapper {
    /deep/ .el-dialog__header {
      padding: 0;
    }

    /deep/ .el-dialog__body {
      padding: 0;

      .header {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: 60px;
        padding: 0px 20px 0px 35px;
        box-sizing: border-box;
        border-bottom: 1px solid #e7e7e7;

        .label {
          color: #000;
          font-size: 20px;
          font-weight: bold;
        }

        .icon-close {
          color: #999;
          font-size: 20px;
          user-select: none;
          cursor: pointer;
        }
      }

      .body {
        width: 100%;
        padding: 0px 35px 0px 35px;
        box-sizing: border-box;

        .search-block {
          display: flex;
          align-items: center;
          width: 100%;
          height: 80px;

          .form-item {
            margin-right: 15px;
          }

          .button {
            height: 30px;
          }
        }

        .place-list {
          display: flex;
          flex-direction: column;
          width: 100%;
          height: 400px;
          overflow: auto;

          .list-item {
            display: flex;
            align-items: center;
            padding: 15px 20px;
            box-sizing: border-box;
            cursor: pointer;

            &:hover {
              background-color: #f4f7fc;
            }

            .radio {
              flex-shrink: 0;
              width: 16px;
              height: 16px;
              border-radius: 50%;
              border: 1px solid #ccc;
              transition: all 0.1s;
              margin-right: 15px;

              &:hover {
                border: 1px solid #387CF7;
              }
            }

            .label {
              display: flex;
              align-items: center;
              width: 100%;
              height: 100%;

              .name {
                width: 40%;
              }

              .city {
                width: 55%;
              }
            }
          }

          .active {
            position: relative;
            background-color: #387CF7;

            &::after {
              content: "";
              position: absolute;
              left: 50%;
              top: 50%;
              transform: translate(-50%, -50%);
              display: block;
              width: 7px;
              height: 7px;
              border-radius: 50%;
              background-color: #ffffff;
            }
          }
        }
      }

      .footer {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 80px;

        .button {
          width: 122px;
        }
      }
    }

    /deep/ .el-dialog__footer {
      padding: 0;
    }
  }
</style>
